var Mongoose = require('mongoose');
var tagSchema = Mongoose.Schema({
    name: {
        type: String,
        require: true,
        index: {unique: true}
    },
    content: {
        type: String,
        require: true
    }

}, {timestamps: true});

var Tag = Mongoose.model('Tag', tagSchema);

Tag.createNewTag = function (newTag, callback) {
    newTag.save(callback);
};

module.exports = Tag;